package com.example.springbootdemo;

import org.springframework.web.bind.annotation.*;

@RestController
public class HelloController {

	//@Value("$(cupSize)")
	//private String cupSize;

    //@RequestMapping("/hello")
	@RequestMapping(value = {"/hello","/hi"},method = RequestMethod.GET)
	//@RequestMapping(value = {"/hello/{id}"},method = RequestMethod.GET)
    //public String hello(@PathVariable("id") Integer id){
	//@GetMapping(value = "/hello")
		public String hello(@RequestParam(value = "id",required = false,defaultValue = "0") Integer id){

			return "id:  "+id;
//        return "hello,this is a springboot demo";
		//return "hello 哈哈";
		//return cupSize;
    }


}
